<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"  
                xmlns:h="http://java.sun.com/jsf/html"  
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./../templates/FoodSageTemplate.xhtml">

    <ui:define name="logout">
        <p:commandLink id="logoutLink" actionListener="#{touristLogoutManagedBean.doLogout}" value="#{bundle['login.logout.label']}" ajax="false" immediate="true" />
    </ui:define>

    <ui:define name="main_menu">
        <f:view beforePhase="#{itineraryViewDailyItineraryManagedBean.initView}" />
        <p:menubar model="#{itineraryViewDailyItineraryManagedBean.touristMainMenuModel}"/>
    </ui:define>

    <ui:define name="nav_menu">
        <p:menu model="#{itineraryViewDailyItineraryManagedBean.touristNavMenuModel}"/>
    </ui:define>

    <ui:define name="content">

        <p:panel id="dailyItineraryDetail" header="#{bundle['dailyItinerary.header.panel']}"  >
            <p:messages id="statusMessages" />

            <h:panelGrid columns="3" cellpadding="5">
                <h:outputLabel id="itineraryDayDateLabel" value="#{bundle['dailyItinerary.dayDate.label']}" style="font-weight: bold"/>
                <h:outputText id="dayDate" value="#{itineraryViewDailyItineraryManagedBean.dayDate}" />
                <p:message for="dayDate" />
            </h:panelGrid>

            <p:dataTable var="itinerarySlot" value="#{itineraryViewDailyItineraryManagedBean.itinerarySlotList}"  
                         emptyMessage="itinerary.norecordsfound.label" 
                         paginator="true" rows="10"  
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                         rowsPerPageTemplate="5,10,15"> 

                <p:column sortBy="#{itinerarySlot.startTime}">  
                    <f:facet name="header">  
                        <h:outputText value="#{bundle['itinerarySlot.startEndTime.label']}" />  
                    </f:facet>  
                    <h:outputText value="#{itinerarySlot.startTime}" />
                    <h:outputText value=" - #{itinerarySlot.endTime}" /> 
                </p:column>  

                <p:column sortBy="#{itinerarySlot.localizedActivityName}" >  
                    <f:facet name="header">  
                        <h:outputText value="#{bundle['itinerarySlot.activityName.label']}" />  
                    </f:facet>  
                    <h:outputText value="#{itinerarySlot.localizedActivityName}" />  
                </p:column>  

                <p:column sortBy="#{itinerarySlot.localizedActivityType}">  
                    <f:facet name="header">  
                        <h:outputText value="#{bundle['itinerarySlot.activityType.label']}" />  
                    </f:facet>  
                    <h:outputText value="#{itinerarySlot.localizedActivityType}" />  
                </p:column>

                <p:column>
                    <p:commandButton value="#{bundle['itinerarySlot.view.button']}" update="statusMessages" actionListener="#{itineraryViewDailyItineraryManagedBean.viewItinerarySlotView(dailyItinerary)}" image="ui-icon ui-icon-pencil" />
                    <p:commandButton value="#{bundle['itinerarySlot.viewTransportChoices.button']}" update="statusMessages" actionListener="#{itineraryViewDailyItineraryManagedBean.goChooseTransportBundleType(itinerarySlot)}" image="ui-icon ui-icon-trash" />
                </p:column>

            </p:dataTable>

            <br/>
            <h:commandLink id="dailyItineraryEditButton" value="#{bundle['dailyItinerary.edit.button']}" actionListener="#{itineraryViewDailyItineraryManagedBean.editItineraryActivities}" />
        </p:panel>
    </ui:define>  

</ui:composition>

